use thiserror::Error;

#[derive(Error, Debug)]
pub enum HelperError {
    #[error("Http Error: `{0:?}`")]
    Http(#[from] reqwest::Error),
    #[error("LibLibAiApi error: {code}, {msg}")]
    LibLibAiApi { code: u32, msg: String },
    #[error("unknown error: `{0}`")]
    Unknown(String),
}

pub type Result<T, E = HelperError> = anyhow::Result<T, E>;
